﻿import java.util.Scanner; 

public class code074 {
	public static void main(String[] argse){
		int i = 0;
		String userName;
		String password;
		Scanner input= new Scanner(System.in);
		for ( i =0;i<3;i++ ){
			System.out.println("输入用户名:");
			userName = input.next();
			System.out.println("输入密码:");
			password = input.next();
			if( "jim".equals(userName)&&"123".equals(password)){
				System.out.println("欢迎登陆");
				break;
			}else {System.out.println("输入错误！您好有"+(2-i)+"次机会！!\n");
			continue;
			}
		}if(i==3){
			System.out.println("抱歉三次都错了");
		}
		}
}
	